const { defineConfig } = require("@vue/cli-service");

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      "/users": {
        target: "http://localhost:8081", // 后端地址
        changeOrigin: true, // 允许跨域
        pathRewrite: { "^/users": "/users" }, // 保持路径不变
      },
    },
  },
});
